﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Liang.KIAPP.Device
{
    /// <summary>
    /// 称重事件
    /// </summary>
    /// <param name="e"></param>
    public delegate void WeighingHander(WeighingDataArgs e);

    /// <summary>
    /// 动态地磅
    /// </summary>
    public interface IDynamicWagon
    {
        /// <summary>
        /// 初始化地磅
        /// </summary>
        /// <returns></returns>
        void Init();

        /// <summary>
        /// 清理关闭
        /// </summary>
        void Cleanup();

        /// <summary>
        /// 称重事件
        /// </summary>
        event WeighingHander WeighingEvent;
    }
    
    /// <summary>
    /// 动态地磅称重数据
    /// </summary>
    public class WeighingDataArgs
    {
        /// <summary>
        /// 地磅数据id
        /// </summary>
        public string WeighingDataId { get; set; }

        /// <summary>
        /// 称重时间
        /// </summary>
        public DateTime WeightTime { get; set; }

        /// <summary>
        /// 轴数
        /// </summary>
        public int AxleNum { get; set; }

        /// <summary>
        /// 总重
        /// </summary>
        public float Weight { get; set; }

        /// <summary>
        /// 车道号
        /// </summary>
        public int RoadNo { get; set; }
    }
}
